{extend name="app/base" /}

{block name="body"}

{include file="app/components/header" /}

<div >
    <table class="layui-table" lay-skin="line">
        <colgroup>
            <col width="150">
            <col width="">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>二维码</th>
            <th>入口链接</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>
                <img src="{$mini_info.qrcode_url}" width="100" height="100">
            </td>
            <td>
                <p style="font-size: 18px;">
                    <a class="apiUrl" href="javascript:;">{$addonInfo.entry_url}</a>
                    <span class="tip1 bt-a"></span>
                </p>
                <p style="color: #787878;">(小程序首页的地址。您可以在关联的公众号自定义菜单（有oAuth权限）或是其它支持的位置直接使用。)</p>
            </td>
            <td><button id="apiUrl" class="layui-btn layui-btn-xs">复制链接</button></td>
        </tr>

        </tbody>
    </table>
</div>
{/block}

{block name="js"}
<script src="__STATIC__/libs/zclip/jquery.zclip.min.js"></script>
<script>
    layui.use(['form'], function(){
        var form = layui.form
                ,layer = layui.layer;
    });

    $(function () {
        $('#apiUrl').zclip({
            path: '__STATIC__/libs/zclip/ZeroClipboard.swf',
            copy: function(){
                $(".tip1").show();
                return $('.apiUrl').text();
            },
            afterCopy: function(){
                $(".tip1").insertAfter($('.tip1')).html('复制成功').fadeOut(2000);
            }
        });
    })
</script>
{/block}